package org.icosagon.core.character;

/**
 * Holds information on how large a creature can be.
 * @author Daniel Owens
 */
public class SizeConstraints {
    private double maxheight, minheight;
    /*
     * Fill in correct and complete size constants later.
     */
    public final static SizeConstraints FINE = new SizeConstraints(0.0, 0.5),
            DIMINUTIVE = new SizeConstraints(0.5, 1.0),
            TINY = new SizeConstraints(1.0, 2.5);
    
    public SizeConstraints(double min, double max) {
        this.setMaximumHeight(max);
        this.setMinimumHeight(min);
    }
    
    /**
     * If value is equal to or less than 0 this function does nothing.
     * @param max
     */
    public void setMaximumHeight(double max) {
        if(max <= 0)
            return;
        this.maxheight = max;
    }
    
    /**
     * If value is equal to or less than 0 this function does nothing.
     * @param max
     */
    public void setMinimumHeight(double min) {
        if(min <= 0)
            return;
        this.minheight = min;
    }
    
    public double getMaximumHeight() {
        return maxheight;
    }
    
    public double getMinimumHeight() {
        return minheight;
    }
}
